/***************************************************************************
 *   Copyright (C) 2010 by Oleg Goncharov  *
 *   $EMAIL$                           *                          
 *                                                                         *
 *   This file is part of ChessVision.                                     *
 *                                                                         *
 *   ChessVision is free software; you can redistribute it and/or modify   *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#ifndef KATANAFUNCS_H
#define KATANAFUNCS_H

#include "vision/geomtypes.h"
#include "ckatanasensing.h"

namespace Katana {
	
/** Положение конца захватва
*/
struct SActuatorPosition {
	double x, y, z, phi, theta, psi;
};

void PseudoContinousControl(CikBase& katana, const Path3D& path, double ref_shift = 10.0, int polltime = 20, int waittime = TM_ENDLESS);
void PseudoLinearMove(CikBase& katana, const Point3d& to, double segement_len = 20.0, double ref_shift = 10.0, int polltime = 20, int waittime = TM_ENDLESS);

int FindObjectInPlane(CKatanaSensing& katana, double h, int steps, int polltime = 10, int waittime = 5000);
double FindObjectUnderGripper(CKatanaSensing& katana, const cv::Point3d& up, double depth, int polltime = 10, int waittime = 5000);

int GrabDotObject(CikBase& katana, double depth, double open = 70, int waittime = 5000);
int GrabVolObject(CKatanaSensing& katana, double depth, double open = 70, double deg_force = 10, int polltime = 10, int waittime = 5000);
int GrabCrash(CKatanaSensing& katana, double depth, double open, int waittime = 5000);
int GrabForce(CKatanaSensing& katana, double depth, double open, int polltime = 10, int waittime = 5000);

}
#endif

